# _*_ coding:utf-8 _*_
import requests
import re
r=requests.get('https://www.sanchuangedu.cn/')
ret = re.findall(r"(?<=img src=\").+(?=\" alt)|(?<=url\().+(?=\);)",r.text,re.M)
lst1=[]
for i in ret:
    if i[:27]!="https://www.sanchuangedu.cn/":
        ret1 = "https://www.sanchuangedu.cn/"+i
        lst1.append(ret1)
    else:
        lst1.append(i)
x=1
for j in lst1:
    image=requests.get(j)
    f1=open("E:/大数据/实训/sanchuang/sanchuang_图片/"+str(x)+".jpg","wb")
    x+=1
    f1.write(image.content)
    f1.close()
print("读取结束")


